/*
 * @Description: 
 * @Version: V1.0.0
 * @Author: liuxiaonan
 * @Date: 2023-11-17 15:41:49
 * @LastEditors: 刘逍男 178111805@qq.com
 * @LastEditTime: 2023-11-21 15:32:19
 * @FilePath: \electron-base\renderer\app.js
 */
// const fs = require('fs')
// console.log(fs)
// fs.writeFile('/Users/macos/Desktop/aaa.txt','abc',()=>{
//     console.log('done.')
// })

// console.log(window.myApi.platform)

document.querySelector('#btn').addEventListener('click',()=>{
    myApi.handleSend()
})

document.querySelector('#btn2').addEventListener('click',()=>{
    myApi.copy()
})
document.querySelector('#btn3').addEventListener('click',()=>{
    myApi.show()
})
document.querySelector('#btn4').addEventListener('click',async ()=>{
    let result = await myApi.captrue()
    document.querySelector('#img').src = result;
    console.log(result)
})
document.querySelector('#btn5').addEventListener('click',()=>{
    myApi.testNativeImage()
})